package com.uzai.console.service.feign;

import com.uzai.common.dto.goods.TextConvertGoodsDto;
import com.uzai.console.common.UzaiRespVo;
import com.uzai.console.dto.feign.deviceauth.MobileDeviceAuthAdd;
import com.uzai.console.dto.feign.deviceauth.MobileDeviceAuthDel;
import com.uzai.console.service.feign.dto.ConvertGoodsDto;
import com.uzai.console.service.feign.impl.ClientApiFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * client api 的client
 *
 * @author mingyang.chen create in 2022/11/4 11:36
 */
@Component
@FeignClient(value = "uzai-client-api", fallbackFactory = ClientApiFallbackFactory.class)
public interface ClientApiService {

    /**
     * 通过商品字符串适合商品信息
     *
     * @param convertGoodsDto 字符串
     * @return
     */
    @PostMapping("/goods/convert")
    UzaiRespVo<ConvertGoodsDto> convertGoods(TextConvertGoodsDto convertGoodsDto);

    /**
     * 添加设备移动端授权
     *
     * @param deviceAuthAdd 添加设备移动端授权
     * @return
     */
    @PostMapping("/mobile/device/auth/add")
    UzaiRespVo<Object> mobileDeviceAuthAdd(MobileDeviceAuthAdd deviceAuthAdd);

    /**
     * 删除设备移动端授权
     *
     * @param deviceAuthDel 删除设备移动端授权
     * @return
     */
    @PostMapping("/mobile/device/auth/del")
    UzaiRespVo<Object> mobileDeviceAuthDel(MobileDeviceAuthDel deviceAuthDel);



}
